package com.sw.bbs.board.vo.response.post;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sw.bbs.common.constant.BBSConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@ApiModel("帖子操作响应")
public class PostOperaResponse {


    @ApiModelProperty("帖子ID")
    private Integer postId;

    @ApiModelProperty("帖子标题")
    private String title;

    @ApiModelProperty("类型 1.普通贴文 2.投票 3.视频 4.图片")
    private String type;

    @ApiModelProperty("收藏人数")
    private Integer collectNum;

    @ApiModelProperty("用户ID")
    private Integer userId;

    @ApiModelProperty("用户名")
    private String username;

    @ApiModelProperty("用户头像")
    private String headImg;


    @ApiModelProperty("操作时间")
    @JsonFormat(pattern = BBSConstant.DATE_FORMAT, timezone= BBSConstant.DATE_TIMEZONE)
    @DateTimeFormat(pattern = BBSConstant.DATE_FORMAT)
    private Date createTime;

}
